<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>直播管理中心</title>
    <meta charset="utf-8">
    <script charset="utf-8" type="text/javascript" src="./js/init.js?v=2014122229711"></script>
</head>
<body>
<header></header>
<div class="wrapper wrapper-video">

<nav>
    <ul class="breadcrumb">
        <li>直播流<span class="divider"> &gt; </span></li>
        <li>列表</li>
    </ul>
</nav>

    <div class="container container-video">
        <div class="container-list" id="StreamListContainer">
            <p class='form-container'
               style="text-align:center;font-weight:bold;font-size:33px;margin-bottom:20px;background-color:#fff;height:70px;line-height:70px;"
               id="title"></p>

            <div class="result">
                <button type="button" class="btn add-stream">添加编码流</button>
                <button type="button" class="btn add-video-type">全景直播参数</button>
                <button type="button" class="btn three-d">3D直播参数</button>
                <button type="button" class="btn streams-preview">编码流预览</button>
                <button type="button" class="btn switch-backup">一键切换灾备</button>
                <div>
                    <table class="grid" id="ChannelListGrid"></table>
                    <div class="pager" id="ChannelListPager"></div>
                </div>
            </div>


            <div id="stream-operate-dlg" class="" style="overflow-y: auto; overflow-x: hidden;">
            </div>

            <div id="video-type-operate-dlg" class="" style="overflow-y: auto; overflow-x: hidden;">
            </div>

            <div id="three-d-operate-dlg" class="" style="overflow-y: auto; overflow-x: hidden;">
            </div>
            <div id="streams-preview-dlg" class="" style="overflow-y: auto; overflow-x: hidden;">
            </div>
            <div id="stream-save-dlg" class="">
            </div>

            <script type="text/x-jquery-tmpl" id="add-video-type">
    <form class="form-horizontal video-type-add-form" mathod="post" id="" class="">

        <div class="control-group">
            <input type="hidden" name="fatherId" value="${fatherId}" disabled>
        </div>
        <div class="control-group">
            <label class="control-label" for="">视频类型：</label>
            <div class="control-group">
                    <select name='videoType' class="query-select-control" autocomplete="off">
                     {{each(i,st) videoType}}
                        <option value="{{= i}}" {{if i==videoTypeValue}} selected {{/if}}>{{= st}}</option>
                     {{/each}}
                    </select>
            </div>
        </div>


        <div class="control-group" id="">
            <label class="control-label" for="">默认视角： X轴</label>
            <div class="control">
                <input type="text" name="angleX" placeholder="" autocomplete="off" class="input-small" value="${angleX}">
                &nbsp;&nbsp;Y轴&nbsp;
                <input type="text" name="angleY" placeholder="" autocomplete="off" class="input-small" value="${angleY}">
            </div>
        </div>

        <div class="control-group" id="">
            <label class="control-label" for="">默认缩放系数：</label>
            <div class="controls">
                <input type="text" name="zoomRate" placeholder="" autocomplete="off" class="input-small" value="${zoomRate}">
            </div>
        </div>

    </form>



            </script>

            <script type="text/x-jquery-tmpl" id="three-d">
    <form class="form-horizontal three-d-form" mathod="post" id="" class="">

        <div class="control-group">
            <input type="hidden" name="fatherId" value="${fatherId}" disabled>
        </div>
        <div class="control-group">
            <label class="control-label" for="">视频类型：</label>
            <div class="control-group">
                    <select name='videoType' class="query-select-control" autocomplete="off">
                     {{each(i,st) videoType}}
                        <option value="{{= i}}" {{if i==videoTypeValue}} selected {{/if}}>{{= st}}</option>
                     {{/each}}
                    </select>
            </div>
        </div>

    </form>


            </script>

            <script type="text/x-jquery-tmpl" id="streams-preview">

<div class="container-fluid">

{{each(i,data) vDatas}}
  <div class="row-fluid" style="margin-top:0px">
  	<h6>清晰度: ${data.streamType}</h6>
  </div>
  <div class="row-fluid" style="margin-top:0px">
  	<div class="span3" style=" min-height: 13px">
  		{{if data.inputSignalType == 'rtmp'}}
  		<!-- <a href="${data.inputSignal}" target="_blank">${data.rtmpIp}</a>-->
  		<a href="http://www.cutv.com/demo/live_test.swf?url=${data.inputSignal}" target="_blank">${data.inputSignal} (信号源)</a>
  		{{else}}
  			<label>${data.inputSignal}</label>
  		{{/if}}
  	</div>

  	<div class="span3" style=" min-height: 13px">
  		<!-- <a href="http://${data.rtmpIp}:8080/stat" target="_blank">${data.rtmpIp}</a>-->
  		<a href="http://www.cutv.com/demo/live_test.swf?url=${data.rtmp}" target="_blank">${data.rtmp} (编码后)</a>
  	</div>
  	<div class="span3" style=" min-height: 13px">
  		<a href="http://www.iqiyi.com/common/flashplayer/20141218/LivePlayer_3_0_3_4.swf?vid=${data.flv}&amp;source=live.lego.iqiyi.com&amp;cid=qc_100001_300089" target="_blank">${data.flv}_flv</a>
  	</div>
  	<div class="span3" style=" min-height: 13px">
  	    {{if pageUrl != null}}
            <a href="${pageUrl}" target="_blank">${pageUrl}</a>
        {{else}}
              当前没有正在播放的节目
        {{/if}}
  	</div>
  </div>
  <div class="row-fluid">
  	<div class="span3" style="height:240px;background:#000;color:#fff">
  		{{if data.inputSignalType == 'rtmp'}}
            <embed src="swfs/StrobeMediaPlayback.swf" width="100%" height="100%" id="StrobeMediaPlayback" quality="high" bgcolor="#000000"
            name="StrobeMediaPlayback" allowfullscreen="true" pluginspage="http://www.adobe.com/go/getflashplayer"
            flashvars="src=${data.inputSignal}&autoHideControlBar=true&streamType=live&autoPlay=true&verbose=true" type="application/x-shockwave-flash">
        {{else}}
        	{{if data.inputSignalType == 'empty'}}
        	无信号源信息，无法预览
        	{{else}}
        	非RTMP源，无法预览.
        	{{/if}}
        {{/if}}
    </div>

    <div class="span3" style="height:240px">
            <embed src="swfs/StrobeMediaPlayback.swf" width="100%" height="100%" id="StrobeMediaPlayback" quality="high" bgcolor="#000000"
            name="StrobeMediaPlayback" allowfullscreen="true" pluginspage="http://www.adobe.com/go/getflashplayer"
            flashvars="src=${data.rtmp}&autoHideControlBar=true&streamType=live&autoPlay=true&verbose=true" type="application/x-shockwave-flash">
    </div>

    <div class="span3" name="flv" style="height:240px;background:#000">
		<embed width="100%" height="100%"
			src="http://www.iqiyi.com/common/flashplayer/20141218/LivePlayer_3_0_3_4.swf"
			quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
            align="middle"
            play="true"
            loop="true"
            scale="showall"
            wmode="window"
            devicefont="false"
            bgcolor="#000000"
            name="player"
            menu="true"
            allowfullscreen="true"
            allowscriptaccess="always"
            flashvars="vid=${data.flv}&source=live.lego.iqiyi.com&cid=qc_100001_300089&autoplay=true"
            salign=""
			type="application/x-shockwave-flash">
    </div>

    <div class="span3" style="height:240px">
    	<object id="flash" height="100%" width="100%" data-player-playerbody="flash" type="application/x-shockwave-flash"
    	data="http://www.iqiyi.com/common/flashplayer/20151126/LivePlayer3_0_8.1.swf" style="">
    	<param name="quality" value="high"><param name="allowScriptAccess" value="always"><param name="wMode" value="window">
    	<param name="align" value="middle"><param name="bgcolor" value="#000000">
    	<param name="swLiveConnect" value="true"><param name="loop" value="true"><param name="play" value="true"><param name="DeviceFont"
    	value="false"><param name="allowFullScreen" value="true"><param name="menu" value="true"><param name="flashVars"
    	value="tvId=${tvId}&autoplay=true&cyclePlay=false&amp;exclusive=0&amp;qiyiProduced=0&amp;share_sTime=0&amp;share_eTime=0&amp;
    	coreUrl=http://www.iqiyi.com/common/flashplayer/20150427/20327.swf&amp;adUrl=http://www.iqiyi.com/player/cupid/common/iaml.swf&amp;
    	preLoaderUrl=http://www.iqiyi.com/player/20140218112703/loading.swf&amp;preLoaderExclusiveUrl=http://www.iqiyi.com/player/20140120131607/loading.swf&amp;
    	preLoaderIqiyiUrl=http://www.iqiyi.com/common/flashplayer/20141229/loading.swf&amp;floatLogoUrl=http://www.iqiyi.com/player/cupid/common/icon.swf&amp;
    	floatLogoExclusiveUrl=http://www.iqiyi.com/player/cupid/common/icon_exclusive.swf&amp;
    	floatLogoIqiyiUrl=http://www.iqiyi.com/player/cupid/common/icon_qiyi_produced.swf&amp;cid=qc_100001_100246&amp;preLoaderType=0&amp;logoOpen=1&amp;
    	logoPosition=20/30&amp;floatLogoOpen=1&amp;floatLogoType=0&amp;floatPosition=20/30&amp;charge=0&amp;label=0&amp;playbackSupport=1&amp;
    	endlessLength=14400&amp;channelId={{= channelId}}&amp;cpnc=6248fb41e3384934fa0fa13fcaad6ee4&amp;cpnv=1.0&amp;tvid=321803400&amp;origin=flash&amp;
    	outsite=false&amp;P00001=a1ezsg9uxtit83m1OEcQr933Ym3wJAhoKhacB68vrBidL6rm2oPIibGg79iHKBo1YsRYm223&amp;profileID=7000722919&amp;
    	profileCookie=deyv71F1kXfm2AvOsqvqgR2Wm1Lzm3F29oh6qnqn5J7b1KfeDxekcaigVQcqhGm3hm2YHtH52&amp;passportID=1000486674&amp;yhls=1460764523543&amp;
    	playerCTime=1448938236031&amp;webEventID=8f9b54559c1f61918b913c5a6f3ea7c3&amp;definitionID=8335b0915a46f21d0a324dcdabc1ffa1">
    	<div id="qiyi_flash_install" style="height:100%;background: rgb(0, 0, 0); ">
    	<div style="top: 50%; width: 100%; text-align: center; margin-top: -50px; position: absolute;"><p>
    	<a style="padding: 10px; color: rgb(255, 255, 255); font-size: 14px;" href="http://www.adobe.com/go/getflashplayer" target="_blank">
    	主人，没有安装flash player不能播放啊~~请您<span class="green">立即安装</span></a></p>
    	<p style="margin-top: 40px;">
    	<a style="padding: 10px; color: rgb(255, 255, 255); font-size: 14px;" href="http://mbdapp.iqiyi.com/j/ot/QIYImedia_0_08.exe" target="_blank">
    	打死也不想装Flash？可以试试我们的<span class="green">桌面客户端</span>，用过的都觉得好！</a></p></div></div></object>
    </div>
  </div>
{{/each}}


</div>




            </script>

            <script type="text/x-jquery-tmpl" id="add-stream">
	<form class="form-horizontal stream-add-form" mathod="post" id="" class="">

			{{if operate =='modify' }}
			
				<input type="hidden" name="id" value="${id}" >				

			{{/if}}


				<div class="control-group" id="">
					<label class="control-label" for="">频道名称：</label>
					<div class="controls">
						<input type="hidden" name="fatherId" value="${fatherId}" disabled>
						<input type="text" name="channelName" value="${channelName}" disabled>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="">清晰度：</label>
						<div class="control-group">

								<select name='streamType' class="query-select-control" autocomplete="off" {{if liveType == '3'}}onchange="Stream.Util.setStreamTypeTip(this.value)"{{/if}} {{if operate =='modify'}}disabled{{/if}}>
								 {{each(i,st) streamType}}
								 	{{if (liveType == '3' && i != 'TOP_SPEED') || (liveType != '3')}}
									<option value="{{= i}}" {{if (operate =='modify' && i==streamTypeSlt) || (liveType == '3' && i==carouselDefaultStream)}} selected {{/if}}>{{= st}}</option>
									{{/if}}
								 {{/each}}
								</select>
							<p style="padding-left:100px;padding-top:5px;">
							smooth(流畅)，high(高清)， 720p(超清720P)， 1080p， 2K， 4K
							</p>

							{{if liveType == '3' }}
								<p id='streamTypeTip' style="padding-left:100px;color:green;padding-top: 10px;">分辨率： 960x540 视频码率：800k 音频码率：64</p>
							{{/if}}
						</div>
				</div>

                <div class="control-group">
                  <label class="control-label" for="">编码方式：</label>
                  <div class="controls">
                      <select name='encodeType' id='encodeType' class="query-select-control" autocomplete="off" {{if operate =='modify'}}disabled{{/if}}>
                        <option value="0" {{if (operate == 'modify' && encodeType=='0') }} selected {{/if}}>H264</option>
                        <option value="1" {{if (operate == 'modify' && encodeType=='1') }} selected {{/if}}>H265</option>
                      </select>
                  </div>
                </div>

                <div class="control-group">
                  <label class="control-label" for="">码流类型：</label>
                  <div class="controls">
                      {{if (operate =='modify' && playType=='0')}}
                            <input name="playType" type="radio" value="0" checked="checked" disabled="disabled">切片</input>
                            <input name="playType" type="radio" value="1" disabled="disabled">实时</input>
                      {{else}}
                            <input name="playType" type="radio" value="0" {{if (playType=='0')}}checked="checked"{{/if}} >切片</input>
                            <input name="playType" type="radio" value="1" {{if (playType=='1')}}checked="checked"{{/if}}>实时</input>
                      {{/if}}
                  </div>
                </div>

				<div class="control-group" id="">
					<label class="control-label" for="">流名称：</label>
					<div class="controls">
						<input type="text" class="streamNameSuggest" name="streamName" size="40" value="{{if operate =='modify'}}${streamName}{{/if}}" id="streamName" {{if operate =='modify'}}disabled{{/if}}>{{if liveType==3}}lb_{{else}}{{if liveType==1}}ct_${universalCode}_{{else}}ls_{{/if}}{{/if}}
						<p>
						{{if liveType == '3'}}
						轮播台" lb_自定义拼音缩写_清晰度"
						<br />如：陕西卫视高清：lb_shxitv1_high
						{{else}}
						常态直播“ ct_节目单标识_清晰度” ,临时直播“ls_自定义拼音缩写_清晰度”
						<br />如：陕西卫视高清：ct_shxitv1_high
						{{/if}}
					</p>
					</div>

				</div>
				<div class="control-group" id="streamIpDiv">
					<label class="control-label" for="">RTMP IP：</label>
					<div class="controls">
						<input type="text" name="streamIp" size="40" value="{{if operate =='modify'}}${streamIp}{{/if}}"  {{if liveType == 1 || operate == 'modify' }} disabled {{/if}} id="streamIp">请填写外网ip
					</div>
				</div>

				<div class="control-group" id="streamAddressDiv">
					<label class="control-label" for="">流地址：</label>
					<div class="controls">
						<input type="text" name="streamAddress" size="40" value="{{if operate =='modify'}}${streamAddress}{{/if}}"  {{if liveType == 1 || operate == 'modify' }} disabled {{/if}} id="streamAddress">
					</div>
				</div>


				<div class="control-group" id="">
					<label class="control-label" for="">杜比流名称：</label>
					<div class="controls">
						<input type="text" class="dolbyStreamNameSuggest" id="dolbySteamName" name="dolbyStreamName" size="40" value="{{if operate =='modify'}}${dolbyStreamName}{{/if}}"  {{if liveType == 1 || operate == 'modify' }} disabled {{/if}} id="dolbyStreamName"> 如: ls_singer_720p_dolby
					</div>
				</div>

				<div class="control-group" id="">
					<label class="control-label" for="">杜比流：</label>
					<div class="controls">
						<input type="text" id="dolbyStreamUrl" name="dolbyStreamUrl" size="40" value="{{if operate =='modify'}}${dolbyStreamUrl}{{/if}}"  {{if liveType == 1 || operate == 'modify' }} disabled {{/if}} id="dolbyStreamUrl">
					</div>
				</div>

				<div class="control-group">
					<label class="control-label" for="">声道：</label>
						<div class="control-group">
								<select name='dolbyAudioChannel' class="query-select-control" autocomplete="off" {{if operate =='modify'}}disabled{{/if}}>
									<option value="5.1" {{if (operate == 'modify' && dolbyAudioChannel=='5.1') }} selected {{/if}}>5.1</option>
									<option value="7.1" {{if (operate == 'modify' && dolbyAudioChannel=='7.1') }} selected {{/if}}>7.1</option>
									<option value="ATMOS" {{if (operate == 'modify' && dolbyAudioChannel=='ATMOS') }} selected {{/if}}>全景声</option>
								</select>
						</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="">互为灾备：</label>
					<div class="controls">
						<label class="radio inline"><input type="radio" {{if  backupEachOther==0 }}checked{{/if}} name="backupEachOther" value="0">否</label>
						<label class="radio inline"><input type="radio" {{if  backupEachOther==1 }}checked{{/if}} name="backupEachOther" value="1">是</label>
					</div>
				</div>
				<div style="display:none">
				<div class="control-group" id="">
					<label class="control-label" for="">镜像服务器数：</label>
					<div class="controls">
						<input type="text" name="peerCount" size="40" value="{{if operate =='modify'}}{{= peerCount}}{{else}}10{{/if}}" id="peerCount"> 最大数字157
					</div>
				</div>

				<div class="control-group" id="">
					<label class="control-label" for="">广播源数：</label>
					<div class="controls">
						<input type="text" name="bcsNum" size="40" value="{{if operate =='modify'}}{{= bcsNum}}{{else}}5{{/if}}" id="bcsNum" > 3 ~ 10 范围的数字
					</div>
				</div>
				</div>

				<div class="control-group" style="height:28px;">
					<label class="control-label" for="">FLV Cutter Id：</label>
                    <div class="control-group">
                        <select name='cutterIdFlv' class="query-select-control" autocomplete="off" >
                            <option value="0" {{if cutterIdFlv == "0"}}selected{{/if}}>默认</option>
                            {{each(i,st) cutterIdsFlv}}
                               <option value="{{= st.cutterIdVal}}" {{if (st.good != -1)}}style="color:red;"{{/if}} {{if (operate == 'modify' && st.cutterIdVal==cutterIdFlv)}} selected {{/if}}>{{= st.desc}}&emsp; (剩余{{= st.count}}可创建)</option>
                            {{/each}}
                        </select> <a href="http://cutteradmin.qiyi.domain:7777/channelusage?user=ppscroot" alt="" target="_blank">查看剩余</a>
                    </div>
                </div>

				<div class="control-group">
					<label class="control-label" for="">TS Cutter Id：</label>
                    <div class="control-group">
                        <select name='cutterIdTs' class="query-select-control" autocomplete="off" >
                            <option value="0" {{if cutterIdTs == "0"}}selected{{/if}}>默认</option>
                            {{each(i,st) cutterIdsTs}}
                               <option value="{{= st.cutterIdVal}}" {{if (st.good != -1)}}style="color:red;"{{/if}}  {{if (operate == 'modify' && st.cutterIdVal==cutterIdTs)}} selected {{/if}}>{{= st.desc}}&emsp; (剩余{{= st.count}}可创建)</option>
                            {{/each}}
                        </select> <a href="http://cutteradmin.qiyi.domain:7777/m3u8_tsusage?user=ppscroot" alt="" target="_blank">查看剩余</a>
                    </div>
                </div>

                {{if liveType == '3' && operate != 'modify'}}
				</div>				<div class="control-group">
					<label class="control-label" for="">地区：</label>
						<div class="control-group">
								<select name='dest' class="query-select-control" autocomplete="off">
								 {{each(i,st) dest}}
									<option value="{{= i}}" {{if operate=='modify' && i==destVal}} selected {{/if}}>{{= st}}</option>
								 {{/each}}
								</select> (*必选)
						</div>
				</div>
				{{/if}}


			{{if operate =='modify' }}
				<div class="control-group">
					<label class="control-label" for="">是否上线：</label>
					<div class="controls">
						<label class="radio inline"><input type="radio" {{if operate =='modify' && isEnable==0 }}checked{{/if}} name="isEnable" value="0">否</label>
						<label class="radio inline"><input type="radio" {{if operate =='modify' && isEnable==1 }}checked{{/if}} name="isEnable" value="1">是</label>
					</div>
				</div>

				{{if streamApiVersionEditable }}
          <div class="control-group" style="display:none;">
            <label class="control-label" for="">CUTTER接口：</label>
            <div class="controls">
                <select name='streamApiVersion' class="query-select-control" autocomplete="off">
                  <!--<option value="1" {{if streamApiVersion == 1}}selected{{/if}}>版本 2.0 </option>-->
				  <option value="1" selected>版本 2.0 </option>
                  <!--<option value="0" {{if streamApiVersion == 0}}selected{{/if}}>版本 1.2 </option>-->
                </select>
            </div>
          </div>
        {{else}}

          <div class="control-group" style="display:none;">
            <label class="control-label" for="">CUTTER接口： </label>
            <div class="controls">
              <label style="padding-top: 5px">版本 {{= streamApiVersionLabel}}</label>
              <input type="hidden" name="streamApiVersion" value="{{= streamApiVersion}}">
            </div>
          </div>
				{{/if}}

			{{else}}
				<div class="control-group" style="display:none;">
					<label class="control-label" for="">CUTTER接口：</label>
					<div class="controls">
							<select name='streamApiVersion' class="query-select-control" autocomplete="off">
								<!--<option value="0">版本 1.2 </option>-->
								<option value="1" selected>版本 2.0 </option>
							</select>
					</div>
				</div>

			{{/if}}

    </form>



            </script>


            <script type="text/x-jquery-tmpl" id="save-stream">

	<form class="form-horizontal stream-info" mathod="post" id="" class="">

<input type="hidden" value="{{= type}}" name="type" />
<input type="hidden" value="{{= dest}}" name="dest" />
<input type="hidden" value="{{= internalIp}}" name="internalIp" />
<input type="hidden" value="{{= streamType}}" name="streamType" />


        {{if type=='encoder'}}
				<div class="control-group" id="">
					<label class="control-label" for="">编码状态：</label>
					<label class="control-label" style="width:200px;text-align:left;" for="">
					${encoderState}
					</label>
	            </div>
        {{/if}}

		{{if type=='flv'}}
                <div class="control-group" id="">
                    <div style="float: left;">
                        <label class="control-label" for="">切片信号：</label>
                            {{each(i,data) streamUrl}}
                                {{if i == 0 }}
                                    {{if i == streamIndex}}
                                        <label class="control-label" style="width:280px;text-align:left;color: springgreen;" >{{= data}}</label>
                                    {{else}}
                                        <label class="control-label" style="width:280px;text-align:left;" >{{= data}}</label>
                                    {{/if}}
                                {{else}}
                                    {{if i == streamIndex}}
                                        <label class="control-label" style="width:280px;text-align:left;color: springgreen;margin-left:111px;" >{{= data}}</label>
                                    {{else}}
                                        <label class="control-label" style="width:280px;text-align:left;margin-left:111px;" >{{= data}}</label>
                                    {{/if}}
                                {{/if}}
                            {{/each}}
                    </div>

                </div>
				<div class="control-group" id="">

					<label class="control-label" for="">flv：</label>
					<label class="control-label" style="width:280px;text-align:left;" for="">
					{{if !flv}}
						未创建
					{{else}}
						<a href="http://www.iqiyi.com/common/flashplayer/20141218/LivePlayer_3_0_3_4.swf?vid={{= flv}}&source=live.lego.iqiyi.com&cid=qc_100001_300089&delay=0&delay_s={{= flvDelayS}}&delay_e={{= flvDelayE}}" target="_blank">{{= flv}}_flv</a>
						{{if flvSpan || flvSpan === 0}}
            <span>  (span={{= flvSpan}})</span>
            {{/if}}
					{{/if}}
					</label>

				</div>

				<div class="control-group" id="">

					<label class="control-label" for="">hcdn：</label>
					<label class="control-label" style="width:250px;text-align:left;" for="">
					{{if !hcdn}}
						未创建
					{{else}}
						<a href="{{= hcdn}}&dump_status=1&cdn_set=1&delay={{= hcdnDelay}}&delay_s={{= hcdnDelayS}}&delay_e={{= hcdnDelayE}}">{{= flv}}_hcdn</a>
					{{/if}}
					</label>

				</div>

				<div class="control-group" id="">

					<label class="control-label" for="">hcdnlive：</label>
					<label class="control-label" style="width:250px;text-align:left;" for="">
					{{if !hcdnlive}}
						未创建
					{{else}}
						<a href="{{= hcdnlive}}">{{= flv}}_hcdnlive</a>
					{{/if}}
					</label>

				</div>
		{{/if}}


		{{if type=='ts'}}
                <div class="control-group" id="">
                    <div style="float: left;">
                        <label class="control-label" for="">切片信号：</label>
                            {{each(i,data) streamUrl}}
                                {{if i == 0 }}
                                    {{if i == streamIndex}}
                                        <label class="control-label" style="width:280px;text-align:left;color: springgreen;" >{{= data}}</label>
                                    {{else}}
                                        <label class="control-label" style="width:280px;text-align:left;" >{{= data}}</label>
                                    {{/if}}
                                {{else}}
                                    {{if i == streamIndex}}
                                        <label class="control-label" style="width:280px;text-align:left;color: springgreen;margin-left:111px;" >{{= data}}</label>
                                    {{else}}
                                        <label class="control-label" style="width:280px;text-align:left;margin-left:111px;" >{{= data}}</label>
                                    {{/if}}
                                {{/if}}
                            {{/each}}
                    </div>

                </div>
				<div class="control-group" id="">

					<label class="control-label" for="">ts：</label>
					<label class="control-label" style="width:280px;text-align:left;" for="">
					{{if !ts}}
						未创建
					{{else}}
					    {{if tsUrl.length > 0 }}
						<a href="{{= tsUrl }}" target="_blank">{{= ts}}_ts</a>
						{{else}}
						{{= ts}}_ts
						{{/if}}
						{{if tsSpan || tsSpan === 0 }}
            <span>  (span={{= tsSpan}})</span>
            {{/if}}
					{{/if}}
					</label>

				</div>

				<div class="control-group" id="">

					<label class="control-label" for="">mp4：</label>
					<label class="control-label" style="width:200px;text-align:left;" for="">
					{{if !mp4}}
						未创建
					{{else}}
						<a href="http://m3u8.live.video.qiyi.com/tslive/{{= mp4}}/{{= mp4}}.flv" target="_blank">{{= mp4}}_mp4</a>
					{{/if}}
					</label>

				</div>
		{{/if}}

		{{if type=='dolby'}}
            <div class="control-group" id="">
                <div style="float: left;">
                    <label class="control-label" for="">切片信号：</label>
                        {{each(i,data) streamUrl}}
                            {{if i == 0 }}
                                {{if i == streamIndex}}
                                    <label class="control-label" style="width:280px;text-align:left;color: springgreen;" >{{= data}}</label>
                                {{else}}
                                    <label class="control-label" style="width:280px;text-align:left;" >{{= data}}</label>
                                {{/if}}
                            {{else}}
                                {{if i == streamIndex}}
                                    <label class="control-label" style="width:280px;text-align:left;color: springgreen;margin-left:111px;" >{{= data}}</label>
                                {{else}}
                                    <label class="control-label" style="width:280px;text-align:left;margin-left:111px;" >{{= data}}</label>
                                {{/if}}
                            {{/if}}
                        {{/each}}
                </div>

            </div>
			<div class="control-group" id="">
				<label class="control-label" for="">dolby: </label>
				<label class="control-label" style="width:200px;text-align:left;" for="">
				{{if !dolby}}
					未创建
				{{else}}
					<a href="{{= dolby}}">{{= dolbyCh}}</a>
				{{/if}}
				{{if dolbySpan || dolbySpan === 0 }}
            		<span>  (span={{= dolbySpan}})</span>
                {{/if}}
				</label>
			</div>
		{{/if}}

		{{if type=='newts'}}
			<div class="control-group" id="">
				<label class="control-label" for="">ts: </label>
				<label class="control-label" style="width:200px;text-align:left;" for="">
				{{if !newts}}
					未创建
				{{else}}
					<a href="{{= newts}}">{{= newtsCh}}</a>
				{{/if}}
				{{if newtsSpan || newtsSpan === 0 }}
            		<span>  (span={{= newtsSpan}})</span>
                {{/if}}
				</label>
			</div>
		{{/if}}

		{{if type=='p2p'}}
				<div class="control-group" id="">

					<label class="control-label" for="">p2p：</label>
					<label class="control-label" style="width:200px;text-align:left;" for="">
					{{if !p2p}}
						未创建
					{{else}}
						<a href="{{= p2p}}">{{= flv}}_p2p</a>
					{{/if}}
					</label>
				</div>
		{{/if}}


	<hr/>


				<div class="control-group" id="">
					<label class="control-label" for="">频道名称：</label>
					<div class="controls">
						<input type="hidden" name="fatherId" value="${fatherId}">
						<input type="text" name="channelName" value="${channelName}" disabled>
					</div>
				</div>

				<div class="control-group" id="" {{if type=='dolby'}}style="display:none"{{/if}}>
					<label class="control-label" for="">流名称：</label>
					<div class="controls">
						<input type="text" name="streamName" value="${streamName}" disabled>
					</div>
				</div>

 {{if type=='flv'}}
				<div class="control-group" id="" style="display:none;">
					<label class="control-label" for="">是否是默认码流：</label>
					<div class="controls" wrap-data="liveType">
						<label class="radio inline">
							<input type="radio" name="isDefault" value="1" {{if isDefault==1}}checked="checked"{{/if}} {{if hasCreate }}disabled{{/if}}>是
						</label>
						<label class="radio inline">
							<input type="radio" name="isDefault" value="0" {{if isDefault==0}}checked="checked"{{/if}} {{if hasCreate }}disabled{{/if}}>否
						</label>
					</div>
				</div>
 {{/if}}

{{if type != 'dolby' && type != 'newts' }}
				<div class="control-group" id="">
					<label class="control-label" for="">FMS地址：</label>
					<div class="controls">
						<input type="text" name="streamIp" value="${streamIp}" disabled>
					</div>
				</div>
{{/if}}

{{if type == 'dolby'}}
				<div class="control-group" id="">
					<label class="control-label" for="">流名称: </label>
					<div class="controls">
						<input type="text" name="dolbyStreamName" value="${dolbyStreamName}" disabled>
					</div>
				</div>

				<div class="control-group" id="">
					<label class="control-label" for="">流地址: </label>
					<div class="controls">
						<input type="text" name="dolbyStreamUrl" value="${dolbyStreamUrl}" disabled>
					</div>
				</div>

{{/if}}

{{if type == 'newts'}}
				<div class="control-group" id="">
					<label class="control-label" for="">流地址: </label>
					<div class="controls">
						<input type="text" name="streamAddress" value="${streamAddress}" disabled>
					</div>
				</div>
{{/if}}

				{{if type == 'encoder'}}
				<div class="control-group" id="">
					<label class="control-label" for="">地区：</label>
					<div class="controls">
						<input type="text" name="destName" value="${destName}" disabled>
					</div>
				</div>
				{{/if}}

				<div class="control-group" style="text-align:center;">

			   {{if type !='p2p' && type != 'encoder' }}
               <button class="btn btn-small btn-stream" operate-type="create" type="button" {{if hasCreate }}disabled{{/if}}>创建</button>
		       {{/if}}

	           {{if type !='encoder'}}
			   <button class="btn btn-small btn-stream" operate-type="start" type="button" {{if hasCreate !='' && status ==1}}disabled{{/if}}>启动</button>

			   <button class="btn btn-small btn-stream" operate-type="restart" type="button" {{if hasCreate !='' && status ==2 || hasCreate !='' && status ==0}}disabled{{/if}}>重启</button>

			   <button class="btn btn-small btn-stream" operate-type="stop" type="button" {{if hasCreate !='' && status ==2 || hasCreate !='' && status ==0}}disabled{{/if}}>停止</button>
			   {{/if}}
			   {{if type == 'encoder'}}
			   	<button class="btn btn-small btn-stream" operate-type="start" type="button" {{if status ==0}}disabled{{/if}}>启动</button>
			   	<button class="btn btn-small btn-stream" operate-type="stop" type="button" {{if status ==1}}disabled{{/if}}>停止</button>
			   {{/if}}

			{{if type !='p2p' && type != 'encoder' }}
			   <button class="btn btn-small btn-stream" operate-type="delete" type="button" {{if !hasCreate }}disabled{{/if}}>删除</button>
			{{/if}}


			   </div>

    </form>




            </script>

            <script type="text/x-jquery-tmpl" id="play-stream">

            </script>


            <script type="text/x-jquery-tmpl" id="stream-info">

            </script>

            <script type="text/javascript">
                require(['epg'], function () {
                    Stream.Action.run();
                })
            </script>
        </div></body>
<html>
